package top.zy.model.event.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.zy.model.event.service.UserService;

import javax.annotation.Resource;

/**
 * @author ZackYoung
 * @version 1.0
 * @date 2021/12/26
 */
@RestController
@RequestMapping("/demo")
public class EventController {
    @Resource
    private UserService userService;

    @GetMapping("/register")
    public String register(String username) {
        userService.register(username);
        return "success";
    }

}
